package com.fashionbrot.github.service;


import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.concurrent.ConcurrentHashMap;

@Slf4j
@Service
public class CacheService {

    private  ConcurrentHashMap<String,Object> cache =new ConcurrentHashMap();

    public  void setCache(Long key ,Object value){
        cache.put(key+"",value);
    }

    public  Object getCache(Long key){
        return cache.get(key+"");
    }

    public  void clear(Long key){
        cache.remove(key);
    }





}
